Fix scripted sequence progression issues and add more developer observability tools#97
Fix scripted sequence progression issues and add more developer observability tools#97Eldbury wants to merge 7 commits intomodawan:masterfrom
Conversation
| if (!object) { | ||
| return -1; | ||
| } | ||
| if (auto creature = std::dynamic_pointer_cast<Creature>(object)) { |
There was a problem hiding this comment.
Use dyn_cast instead of std::dynamic_pointer_cast to downcast Objects.
| for (const auto &localPoint : geometry) { | ||
| glm::vec3 worldPoint = trigger->position() + localPoint; | ||
| centroid += worldPoint; | ||
| glm::vec3 screen = glm::project(worldPoint, view, projection, viewport); |
| } | ||
|
|
||
| glm::vec3 color = inspected ? glm::vec3(1.0f, 1.0f, 1.0f) : (hostile ? glm::vec3(1.0f, 0.42f, 0.36f) : glm::vec3(0.68f, 0.92f, 1.0f)); | ||
| std::string label = str(boost::format("#%u %s %s f=%d H=%d sel=%d cmd=%d vis=%d plot=%d") % |
There was a problem hiding this comment.
I'm not sure if we need all of these values, given that we have info console command. ID, tag, and maybe blueprint are definitely going to be useful. We can keep the rest for now, and remove them later if they turn out to be too distracting.
| _executingAction.reset(); | ||
| throw; | ||
| } | ||
| _executingAction.reset(); |
There was a problem hiding this comment.
Can you share more details about the problem? From the PR description:
make ClearAllActions() continuation-safe when called from the currently executing assigned action, so the active action chain can complete instead of erasing its own follow-up continuation
So an action triggered ClearAllActions and removed itself as well? What action can do this?
Can Action::lock help here? Or perhaps we can lock an action before execute?
bool wasLocked = action->locked();
action->lock();
action->execute();
if (!wasLocked) {
action->unlock();
}
There is no Action::unlock function, but maybe we can add it instead of _executingAction and that new loop above.
|
Superseding this mixed PR with separate follow-up PRs per review feedback:
Closing this PR so each review track stays focused by concern. |

Summary
This PR contains a small set of shared-engine fixes that improved early scripted sequence progression in K1, along with developer observability tools surfaced through the existing Developer Mode launcher flow.
Engine fixes
Object::update(dt)fromTrigger::update()so trigger-owned delayed actions and queued actions advance correctlyArea::startDialog()to validate the resolved/final dialogue resref rather than the original empty scripted resrefClearAllActions()continuation-safe when called from the currently executing assigned action, so the active action chain can complete instead of erasing its own follow-up continuationThese changes were identified while debugging early Endar Spire progression, but they are implemented as shared engine-semantic fixes rather than K1-specific content hacks.
Observed bug fixes
Developer tooling
Ctrl+Shift+DoverlayCtrl+Shift+TtriggersCtrl+Shift+AlabelsCtrl+Shift+WwatchValidation